﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ass5Vinyl.CONTROLLER
{
    public class  EmployeesManaging
    {
        
        
        public EmployeesManaging() { }

        public string InsertEmployee(Employee e)
        {
            DataTable employeeExist = DataQueries.PersonExist(e.eId.ToString(), "employee");
            if (employeeExist.Rows.Count > 0)
                return "Employee Num. " + e.eId + " is already exist in the system ";

            DataQueries.InsertEmployee(e, "employee");
            return "Employee was add successfully";
        }

    }
    public struct Employee
    {
        public int eId;
        public string eName;
        public string eAdderess;
        public string ePhone;
        public string eSalary;
    }
}
